/**
 * Created by JLB1 on 2017/1/18.
 */
$(function () {
    var item = ['../../images/banner1.jpg','../../images/banner2.jpg'];
    var bannerList = new Array();
    $.each(item,function(i){
        bannerList.push('<li><img src="'+item[i]+'" alt=""></li>')
        $('.slide .dot').append('<span></span>');
    });
    var banner = $(bannerList.join(''));
    $('#slide_list').append(banner)

    $(document).ready(function () {
        $('#slide').swipeSlide({
            continuousScroll:true,
            speed : 3000,
            transitionType : 'cubic-bezier(0.22, 0.69, 0.72, 0.88)',
            firstCallback : function(i,sum,me){
                me.find('.dot').children().first().addClass('cur');//下标原点
            },
            callback : function(i,sum,me){
                me.find('.dot').children().eq(i).addClass('cur').siblings().removeClass('cur');
            }
        });
    })
});

